//
//  NetManager.h
//  Net2
//
//  Created by student on 16/3/29.
//  Copyright © 2016年 NIIT. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Singleton.h"
@protocol NetManagerDelegate<NSObject>

//+ (BOOL)loginWithUserName:(NSString *)username andPassword:(NSString *)password;
//
//+ (void)loginWithUserName:(NSString *)username andPassword:(NSString *)password successBlock:(void(^)())successBlock failedBlock:(void(^)(NSError *))failBlock;
// 登陆回调
- (void)loginSuccess;
- (void)loginFail:(NSError *)error;

// 电影列表获取回调
- (void)requestMovieListSuccess;
- (void)requestMovieListFail;

@end

// 封装数据请求
@interface NetManager : NSObject


// 单例
SingletonH(NetManager);
- (void)loginWithUserName:(NSString *)username
              andPassword:(NSString *)password;
- (void)requestMovieList;

// 代理人
@property (nonatomic,weak) id<NetManagerDelegate> delegate;
@end
